package com.imagecollector.common.enums;

import lombok.Getter;

/**
 * @Author: wrf
 * @Date: 2024/6/24 11:23
 * @Description:
 */
@Getter
public enum CodeEnum {

    SUCCESS(200,"请求成功", "请求成功"),
    FAIL(400,"请求失败", "请求失败, 具体问题请分析后台日志"),
    UNAUTHORIZED_ERROR(401,"权限认证失败", "无权限操作或者登录状态失效"),
    NO_PERMISSION(403,"权限不足", "权限不足, 请联系管理员"),
    PARAM_ERROR(405,"参数异常", "参数传递不符合规定, 具体问题请分析后台日志"),
    SERVER_ERROR(500,"业务异常", "后台业务报错，具体问题请分析后台日志"),
    ADMIN_CAPTCHA_CODE_NOT_FOUND(304, "未输入验证码", "未输入验证码"),
    ADMIN_CAPTCHA_CODE_EXPIRED(303, "验证码已过期", "验证码已过期"),
    ADMIN_CAPTCHA_CODE_ERROR(302, "验证码错误", "验证码错误"),
    ADMIN_ACCOUNT_NOT_EXIST_ERROR(306, "账号不存在", "账号不存在"),
    ADMIN_ACCOUNT_ERROR(307, "用户名或密码错误", "用户名或密码错误"),
    ADMIN_ACCOUNT_DISABLE_ERROR(308, "账号被冻结", "账号不存在"),






    LOGIN_ERROR(501,"登录失败", "登录失败，请检查账号密码是否正确");


    private final Integer code;
    private final String msg;
    private final String desc;

    CodeEnum(Integer code, String msg, String desc) {
        this.code = code;
        this.msg = msg;
        this.desc = desc;
    }
}
